home *** CD-ROM | disk | FTP | other *** search
- /****i* SOURCE_FILE/INFO
- *
- * NAME
- * BrowserDlg.js
- *
- * USAGE
- * Part of Netobjects JavaScript Library.
- *
- * COPYRIGHT
- * Copyright ⌐ 2000-2005 Website Pros, Inc.
- * All Rights Reserved.
- *
- * This is an unpublished work protected by Website Pros, Inc.
- * as a trade secret, and is not to be used or disclosed except as
- * expressly provided in a written license agreement executed by
- * you and Website Pros, Inc.
- *
- * <copyright@websitepros.com>
- *
- * NOTES
- * JavaScript code.
- *
- *****/
-
- if (!IS.isModuleInitialized("IS.NOF.DIALOGS.BrowserDlg"))
- {
-
- /****h* NOF_JavaScript_Library/NOF.DIALOGS.BrowserDlg
- *
- * NAME
- * NOF.DIALOGS.BrowserDlg
- *
- * DESCRIPTION
- *
- * The <code>BrowserDlg</code> class
- *
- ****/
-
- /**
- * constructor
- **/
- function DIALOGS_BrowserDlg() {
- this.__proto__ = DIALOGS_BrowserDlg.prototype;
- }
- {
- var member = DIALOGS_BrowserDlg.prototype;
- member.CLASS_NAME = "DIALOGS.BrowserDlg"; //member.NAMESPACE + "." + "BrowserDlg";
-
- var method = DIALOGS_BrowserDlg.prototype;
-
- /**
- * Opens a browser window within a modal dialog (the function will not return until the dialog is closed).
- *
- * @param pURL specifies the URL to open in the browser window.
- * If you want to open a local file you can use a relative path.
- * In an external URL you can specify the symbolic name of a password.
- * @param pHeader can be used to add information to the header of the request.
- * @param pWidth the width of the dialog.
- * @param pHeight the height of the dialog.
- * @return true if the dialog is successfully opened and if it is closed by calling
- * closeDialog with the argument true. Otherwise the function returns false (and
- * the NOF.App.Cancel property is set to true).
- **/
- method.openDialog = function (/*String*/ pURL,/*String*/ pHeader, /*int*/ pWidth, /*int*/ pHeight) {
- return NOF.App.getFSIApp().OpenDialog(pURL, pHeader, pWidth, pHeight);
- }
-
- /**
- * Closes a dialog previously opened (using openDialog or openBrowser).
- * This function needs to be called from within an HTML page shown in the dialog
- * because openDialog is modal. The argument will be passed on to the caller of openDialog.
- * @param result
- **/
- method.closeDialog = function (/*boolean*/ result) {
- NOF.App.getFSIApp().CloseDialog(result);
- }
-
- /**
- * Opens a browser window within a modal dialog (the function will not return until the dialog is closed).
- *
- * @param pURL specifies the URL to open in the browser window.
- * If you want to open a local file you can use a relative path.
- * In an external URL you can specify the symbolic name of a password.
- * @param pHeader can be used to add information to the header of the request.
- * @param pWidth the width of the dialog.
- * @param pHeight the height of the dialog.
- * @param controlsEnabled true if window should contains controls for going back,
- * forward, home, and print; false if window should contains controls, but are disabled except the print control;
- * null if window doesn't need any of these controls.
- * @return true if the dialog is successfully opened and if it is closed by calling
- * closeDialog with the argument true. Otherwise the function returns false (and
- * the NOF.App.Cancel property is set to true).
- **/
- method.openBrowser = function (/*String*/ pURL,/*String*/ pHeader, /*int*/ pWidth, /*int*/ pHeight, /*boolean*/ controlsEnabled) {
- if (controlsEnabled == null) {
- return NOF.App.getFSIApp().OpenDialog(pURL, pHeader, pWidth, pHeight);
- } else if (controlsEnabled == true) {
- return NOF.App.getFSIApp2().OpenBrowser(pURL, pHeader, pWidth, pHeight);
- } else {
- return NOF.App.getFSIApp2().BrowserNoCtrl(pURL, pHeader, pWidth, pHeight);
- }
- }
- }
-
- NOF.DIALOGS.__proto__.BrowserDlg = new DIALOGS_BrowserDlg();
- }